package com.cmsz.uregs.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "users")
public class User {

	public User() {
	}

	public User(String username, String password, String name, String nic, int sex) {
		super();
		this.username = username;
		this.password = password;
		this.name = name;
		this.nic = nic;
		this.sex = sex;
	}

	public User(String username, String password, String name, String nic, int sex, int age, String email, String phone, String selfshow) {
		super();
		this.username = username;
		this.password = password;
		this.name = name;
		this.nic = nic;
		this.sex = sex;
		this.age = age;
		this.email = email;
		this.phone = phone;
		this.selfshow = selfshow;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;
	@Column(nullable = false, length = 20)
	private String username;
	@Column(nullable = false, length = 20)
	private String password;
	@Column(nullable = false, length = 20)
	private String name;
	@Column(nullable = false, length = 30)
	private String nic;
	@Column(nullable = false, columnDefinition = "char(1)")
	private Integer sex;
	private Integer age;
	@Column(length = 30)
	private String email;
	@Column(length = 20)
	private String phone;
	@Column(length = 300)
	private String selfshow;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getNic() {
		return nic;
	}

	public void setNic(String nic) {
		this.nic = nic;
	}



	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getSelfshow() {
		return selfshow;
	}

	public void setSelfshow(String selfshow) {
		this.selfshow = selfshow;
	}
}
